<!--
 * @Author: WuFeng <763467339@qq.com>
 * @Date: 2022-04-12 18:48:37
 * @LastEditTime: 2022-07-20 00:29:09
 * @LastEditors: WuFeng <763467339@qq.com>
 * @Description: 详情查看 页面
 * @FilePath: \vue3-element-plus-web\src\views\DrawerDemo\components\Drawer\detail.vue
 * Copyright 版权声明
-->
<template>
  <div class="">
    <el-form
      ref="dataForm"
      :model="temp"
      label-width="80px"
      style='width:100%;'
    >
      <el-form-item label="用户名">
        {{temp.name}}
      </el-form-item>

      <el-form-item label="密码">
        {{temp.pwd}}
      </el-form-item>

      <el-form-item label="序号">
        {{temp.orderNum}}
      </el-form-item>

      <el-form-item label="状态">
        {{temp.state}}
      </el-form-item>

    </el-form>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Detail',
  computed: {
    ...mapGetters([
      'drawerCurrent'
    ]),
    drawerType: function() {
      return this.drawerCurrent.drawerType
    }
  },
  components: {
  },
  data() {
    return {
      temp: {}
    }
  },
  watch: {
  },
  created() {
    // 列表传过来的数据
    const temp = this.drawerCurrent.params.row
    this.temp = Object.assign({}, this.temp, temp)
    // *************如果需要从接口数据的话执行一下操作
    // drawer loadding 状态 打开
    this.$store.dispatch('SetDrawerloading', true)
    setTimeout(() => {
      // drawer loadding 状态 关闭
      this.$store.dispatch('SetDrawerloading', false)
    }, 500)
  },
  activated() {
  },
  deactivated() {
  },
  methods: {
    // 获取表单数据
    getFormData() {
      return this.temp
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
</style>
